<template lang="html">
	<div class="menus">
		<mu-row gutter style="padding-right: 8px; padding-left: 8px;">
			<mu-col span="6" class="mybox"  sm="4" md="3" lg="3" xl="2"
				><div class="grid-cell">
                    <router-link to="/HomeDelivery">
                        <mu-button color="primary" class="mubutton" full-width>
                            <mu-row>
                                <mu-col span="12" >
                                    <van-icon size="500%" class-prefix="my-icon" name="PickUp" />
                                </mu-col>
                                <mu-col span="12" >
                                    <span>上门提货</span>       
                                </mu-col>
                            </mu-row>
                        </mu-button>
                    </router-link>
				</div></mu-col
			>
			<mu-col span="6" class="mybox"  sm="4" md="3" lg="3" xl="2"
				><div class="grid-cell">
                    <router-link to="/About">
                        <mu-button color="primary" class="mubutton" full-width>
                            <mu-row>
                                <mu-col span="12" >
                                    <van-icon size="500%" class-prefix="my-icon" name="AirportDepOperate" />
                                </mu-col>
                                <mu-col span="12" >
                                    <span>机场出港操作</span>       
                                </mu-col>
                            </mu-row>
                        </mu-button>
                    </router-link>
				</div></mu-col
			>
			<mu-col span="6" class="mybox"  sm="4" md="3" lg="3" xl="2"
				><div class="grid-cell">
                    <router-link to="/About">
                        <mu-button color="primary" class="mubutton" full-width>
                            <mu-row>
                                <mu-col span="12" >
                                    <van-icon size="500%" class-prefix="my-icon" name="AirportArrivalOperate" />
                                </mu-col>
                                <mu-col span="12" >
                                    <span>机场进港操作</span>       
                                </mu-col>
                            </mu-row>
                        </mu-button>
                    </router-link>
				</div></mu-col
			>
			<mu-col span="6" class="mybox"  sm="4" md="3" lg="3" xl="2"
				><div class="grid-cell">
                    <router-link to="/About">
                        <mu-button color="primary" class="mubutton" full-width>
                            <mu-row>
                                <mu-col span="12" >
                                    <van-icon size="500%" class-prefix="my-icon" name="DoorConfirmation" />
                                </mu-col>
                                <mu-col span="12" >
                                    <span>到车确认</span>       
                                </mu-col>
                            </mu-row>
                        </mu-button>
                    </router-link>
				</div></mu-col
			>
			<mu-col span="6" class="mybox"  sm="4" md="3" lg="3" xl="2"
				><div class="grid-cell">
                    <router-link to="/About">
                        <mu-button color="primary" class="mubutton" full-width>
                            <mu-row>
                                <mu-col span="12" >
                                    <van-icon size="500%" class-prefix="my-icon" name="customer-signfor" />
                                </mu-col>
                                <mu-col span="12" >
                                    <span>客户签收</span>       
                                </mu-col>
                            </mu-row>
                        </mu-button>
                    </router-link>
				</div></mu-col
			>
			<mu-col span="6" class="mybox"  sm="4" md="3" lg="3" xl="2"
				><div class="grid-cell">
                    <router-link to="/About">
                        <mu-button color="primary" class="mubutton" full-width>
                            <mu-row>
                                <mu-col span="12" >
                                    <van-icon size="500%" class-prefix="my-icon" name="document-upload" />
                                </mu-col>
                                <mu-col span="12" >
                                    <span>单证上传</span>       
                                </mu-col>
                            </mu-row>
                        </mu-button>
                    </router-link>
				</div></mu-col
			>
			<mu-col span="6" class="mybox"  sm="4" md="3" lg="3" xl="2"
				><div class="grid-cell">
                    <router-link to="/About">
                        <mu-button color="primary" class="mubutton" full-width>
                            <mu-row>
                                <mu-col span="12" >
                                    <van-icon size="500%" class-prefix="my-icon" name="BeatingScan" />
                                </mu-col>
                                <mu-col span="12" >
                                    <span>打板扫描</span>       
                                </mu-col>
                            </mu-row>
                        </mu-button>
                    </router-link>
				</div></mu-col
			>
		</mu-row>
	</div>
</template>
<script>
//let moment = require('moment');
export default {
    data () {
        return {
            route: '',
        };
    },
    methods: {
        //
    },
    activated: function () {
        console.info("Activated");
        let _this = this;

        if (this.global.loginpath == '/') {
            this.global.OpenIndexdb();
            this.global.loginpath = '*';
        }

        _this.$parent.title = '主菜单';

        _this
            .$axios({
                method: 'post',
                url: 'Test/GetTime',
            })
            .then(function (res) {
                let time2 = new Date();
                console.info(res.data.msg);
                window.localStorage['datetime'] = res.data.msg;
                let date2 = res.data.msg.replace(/-/g, '/');
                let time1 = new Date(date2);
                if (
                    time2 - time1 > 1000 * 60 * 5 ||
                    time2 - time1 < -1 * 1000 * 60 * 5
                ) {
                    alert('当前手机时间不正确！前先校准时间！');
                }

                // let mam = api.require('mam');
                // mam.checkUpdate(function(ret, err) {
                // 	console.info(ret);
                // 	console.info(err);
                // 	if (ret) {
                // 		let result = ret.result;
                // 		if (result.update == true && result.closed == false) {
                // 			let str =
                // 				'发现新版本:' +
                // 				result.version +
                // 				'，请重启APP进行更新';
                // 			_this.$toast(str);
                // 		}
                // 	}
                // });
            })
            .catch(function (err) {
                console.info(err);
                _this.$toast('请检查网络！');
                return;
            });
    },
    created: function () {
        let _this = this;
        _this.$parent.title = '主菜单';
        if (_this.global.loginpath == '/') {
            _this.global.OpenIndexdb();
            _this.global.loginpath = '*';
        }
        if (global.isApp == 'true') {
            // this.test();
        }
    },
    updated () { },
};
</script>
<style scoped>
.menus {
    padding-bottom: 15px;
}
.mybox {
    width: 50vw;
    height: 50vw;
}
.mubutton span {
    font-size: 5vw;
}
@media (min-width: 576px) {
    .mybox {
        width: 33vw;
        height: 33vw;
    }
    .mubutton span {
        font-size: 3vw;
    }
}
@media (min-width: 768px) {
    .mybox {
        width: 25vw;
        height: 25vw;
    }
    .mubutton span {
        font-size: 2vw;
    }
}
@media (min-width: 992px) {
    .mybox {
        width: 25vw;
        height: 25vw;
    }
    .mubutton span {
        font-size: 2vw;
    }
}
@media (min-width: 1200px) {
    .mybox {
        width: 16vw;
        height: 16vw;
    }
    .mubutton span {
        font-size: 1vw;
    }
}
.grid-cell {
    height: 100%;
    padding-top: 15px;
    /* padding-bottom: 15px; */
}
.mubutton {
    height: 100%;
}
</style>
